//
//  InputDeviceReport.swift
//  JiaoTu
//
//  Created by Hu Gang on 2021/2/28.
//

import Foundation
import UIKit

struct InputDeviceReport : Codable {
    var deviceId : UUID
    var name     : String
    var os       : Int8 = 1
    var osVersion: String
    var model    : String
    
    init() {
        deviceId = PhoneDevice().deviceId!
        os = 1
        let device = UIDevice.current
        self.name = device.name
        self.os = 1
        self.osVersion = device.systemVersion
        self.model = device.model
    }
    
    private enum CodingKeys:String,CodingKey {
        case deviceId = "deviceId"
        case name = "name"
        case os = "os"
        case osVersion = "osVersion"
        case model = "model"
    }
}

